<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    .volume-slider {
        width: 200px;
        height: 30px;
        position: relative;
        margin: 20px auto;
    }

    .slider {
        -webkit-appearance: none;
        width: 100%;
        height: 10px;
        border-radius: 5px;
        background-color: #ddd;
        outline: none;
        margin: 0;
        padding: 0;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background-color: #4caf50;
        cursor: pointer;
    }

    .slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background-color: #4caf50;
        cursor: pointer;
    }

    .slider-value {
        position: absolute;
        top: -25px;
        left: 0;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background-color: #4caf50;
        color: #fff;
        font-size: 14px;
        font-weight: bold;
        text-align: center;
        line-height: 30px;
    }

</style>
<body>
<div class="volume-slider">
    <input type="range" min="0" max="100" value="50" class="slider" id="volume-slider">
    <div class="slider-value" id="slider-value">50</div>
</div>

</body>

<script>

    const slider = document.getElementById('volume-slider');
    const sliderValue = document.getElementById('slider-value');

    slider.addEventListener('input', function () {
        sliderValue.innerHTML = slider.value;
    });

</script>
</html>
